package design.patterns.commandmodel.simpledemo;

/**
 * @Desc:   具体命令类实现了抽象命令角色规定出的接口，即执行一个方法
 * @author: cww
 * @DateTime: 2020-06-13 10:22
 */

public class ConcreteCommand implements Command {
    private Receiver receiver;

    public ConcreteCommand(Receiver receiver) {
        this.receiver = receiver;
    }

    @Override
    public void execute() {
        receiver.action();
    }
}
